package com.appkubes.fintech.admin.application.credit.dao;

import com.appkubes.fintech.core.pojo.FintechCreditMapper;
import org.apache.ibatis.annotations.Options;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.mapping.StatementType;
import org.springframework.data.repository.query.Param;
import org.springframework.stereotype.Repository;

/**
 * @Author: Rongjie
 * @Date: 2020/1/5 11:12
 * @Description: CreditDao
 */
@Repository
public interface CreditDao extends FintechCreditMapper {
    @SuppressWarnings("rawtypes")
    @Select("call cleanCustomerByUserKey(#{userKey})")
    @Options(statementType= StatementType.CALLABLE )
    public void cleanUserInfo(@Param("userKey") String userKey);



    @SuppressWarnings("rawtypes")
    @Select("call cancelOrderAndKeepCreditByUserKey(#{userKey},#{orderNumber})")
    @Options(statementType= StatementType.CALLABLE )
    public void deleteOrder(@Param("userKey") String userKey,@Param("orderNumber") String orderNumber);
}

